<html>
<%= javascript_include_tag :defaults %>
<%= javascript_tag(content=
	"function addText(request) {
	    document.getElementById(\"msgboard\").innerHTML += request.responseText;
		}"
	)
%>

</head>
Signed in as <%= @jid.to_s() %>
<br/>

<%= periodically_call_remote :update => '',
    :url => {:action => "msg_handler"},
    :frequency => 2.0,
    :complete =>"addText(request)" %>
 
<b>Message Board:</b>

<textarea id='msgboard' name= "mb" cols="80" rows="10" wrap="soft" readonly="yes">
</textarea>

<br/>
<br/>

Message:<textarea name= "msgin" cols="80" rows="3">
	</textarea>
<%= link_to_remote( "Send",
                    :update => "",
                    :url =>{ :action => "msg_handler" }) %>
<br/>
<br/>


<form>
Required Field: <input type='text' id='req1'/>
<input type='button' onclick="addText()" value='Updated Message' />
</form>
	
</html>
